General Information

This Xtra will work on Macintosh and Windows computers. 

This Xtra will let you rotate a cast member in runtime. The cast member can be rotated in 1 degree precision. The cast member should be an image. 

Since the Xtra alters a cast member, you still maintain all the control over the display of the member as a sprite, including ink affects, blends, and layering.

Opening the Xtra.

Put the Xtra in the "Xtras" folder near your Director application. Then call -  

set RotateObj = new(Xtra "FreeRotate")

Have RotateObj declared as a Global variable since you will be referring to it later. 

You will probably be doing this in the beginning of the movie so your handler will probably look like this:

on StartMovie
	Global RotateObj 
	if not  RotateObj then		
	set RotateObj = new(Xtra"FreeRotate")
	end if
end StartMovie

Closing the Xtra.

When you are done you should close the Xtra by assigning 0 to the variable. 

on StopMovie
  global RotateObj
  set RotateObj  = 0
end


Rotating a cast member.


Before you can rotate a cast member you must prepare an additional cast member which will accept the result of the operation. This cast member must be of kind "Image". You can create one by opening the paint window and scribbling something. You can also copy an existing cast member.

On Windows computers the castmember to be rotated has to be of 32 bit color depth. On Macs any depth is OK. The screen depth does not matter.

Please note that the Xtra will enlarge the destination cast member's size to the smallest size that will allow a full (360 degrees) rotation.

To rotate you call the "Rotate" method.
The Rotate(RotateObj, Source, Destination, Degrees, Red, Green, Blue, AntiAlias) method  takes eight arguments.

RotateObj - The instance returned from New().

Source - An integer which is the number of the cast member to which the filter will be applied.

Destination - An integer which is the number of the cast member that the result of the filter operation will be placed in. Make sure that a cast member of type "Image" does exist in this number.

Degrees - an integer defining the number of degrees the cast member will be rotated.

Red - Green - Blue - Three integers with a value of 0 -255 defining the RGB value of the color to be used to fill the new area created by the enlargement of the destination cast member.

AntiAlias - 0 for no anti aliasing , 1 for anti aliasing.


For additional help , and purchasing information :

www.itp.tsoa.nyu.edu/~danny/Xtras.html

danny@rozin.com


